#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QGridLayout>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QGridLayout* layout = new QGridLayout();

    QPushButton* button1 = new QPushButton("红色");
    QPushButton* button2 = new QPushButton("无色");

    // button1->setStyleSheet("QPushButton{color:red;}");
    // this->setStyleSheet("QPushButton{color:red;}");

    button1->setStyleSheet("QPushButton{font-size:50px;}");
    button1->setStyleSheet("QPushButton{color:red;}");
    button2->setStyleSheet("QPushButton{font-size:50px; color:red;}");

    layout->addWidget(button1, 0, 0);
    layout->addWidget(button2, 0, 1);

    this->setLayout(layout);
}

Widget::~Widget()
{
    delete ui;
}

